<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<script type="text/javascript" src="<%=basePath%>js/fenye.js"></script>
<script type="text/javascript">
<!--
   $(function(){
	   initializePageNav(1,$("#count").val());
	  
	   var basePath = $("#basePath").val();
	   $("#bys").click(function(){
		   if($("#collapseOne").is(":visible") == false)
			{
				//$(".subMenu").hide("slow");
				$("#img").attr("src",basePath+"images/error1.gif");
				
			}
			else {
		    //	alert("...");
				
				$("#img").attr("src",basePath+"images/add.gif");
			}
		   $("#collapseOne").fadeToggle();
	   });
	   $("#is").val()
	   $("#js").change(function(){
			    var id = ${jbid};
				 var uri = basePath + "getXt/"+${jbid} ;
				 $.ajax({   
					  type: "POST",  
					  url: uri,  
					  data: 'js=' + $(this).val(),  
					  timeout: 15*1000,
					  success: function(data){
						  var member=eval("("+data + ")"); //正确写法
						  var second= " <tbody>";
						  var count;
						  for(var i=0;i<member.length;i++)
			               	{						 
			            	//var test="<option value='"+member[i].academyId+"'>"+member[i].academyName+"</option>";
			            	var test="<tr class='discuss'><td><a href='"+basePath+"xybys/detail/"+member[i].xyId+"'>"+
			            	member[i].xyName+"</a></td></tr>";
			            	count=member[i].count;
			            	if(count!=0){
			            		 $("#count").val(count);
			            	}
			            	second+=test; 	
			            	// alert(second);
			               	}
						  second+="</tbody>";
						 // alert(second);
						 
						
						$("#xybys").html(second);
						initializePageNav(1, $("#count").val());
					  },
					  error:function(result){
			              	alert("出现异常！请稍后再试！");
			              }
				  });
			
		 });
   });
//-->
</script>
<div class='span2 news1' style='height:140px;'>
<div class="">
  <ul class='menu nav nav-tabs nav-stacked'>  
     <li><a href='<%=basePath%>yxxy'>优秀校友</a></li>
     <li>
     <div class="accordion" id="accordion2">
       <div class="accordion-group">
         <div class="accordion-heading">
           <a id='bys' class="accordion-toggle" 
           ><img id='img' src="<%=basePath%>images/add.gif" />
            <!--   <a href='<%=basePath%>yxbys'>优秀毕业生</a>-->
                              优秀毕业生
           </a>
      <div id="collapseOne"  style="height: 0px;margin-left:80px;">
       <div class="">
       <table class="table table-hover">
       <c:forEach items="${jbs }" var="jb">
          <tr id='jb${jb.xyjbId }'><td><a href='<%=basePath %>yxbyss/${jb.xyjbId }'>${jb.xyjbName }</a></td></tr>
       </c:forEach>
         </table> 
      </div>
     </div>
      </div>
     </div>  
     </div> 
     </li>  
  </ul>
  </div>
</div>
<div class='span9 newscontent' style='height:600px;'>
    <c:if test="${not empty jss }">
        <pre >届数：   <select  class="span2" id='js' name='js' >
        <c:forEach items="${jss }" var="js">
           <option value="${js }">${js }</option>
        </c:forEach>
	</select>
   </pre>
    </c:if>
   <table class="table table-hover text-center" id='xybys'>
      
      <tbody>
      <c:forEach items="${xies }" var="xi">
         <tr class='discuss'><td><a href='<%=basePath %>xybys/detail/${xi.xyId }'>${xi.xyName }</a></td></tr>
      </c:forEach>
      
      </tbody>
   </table> 
   <input type="hidden" id='count' value='${fn:length(xies)}'/>
   <input type='hidden' value="${xies[0].xyJs }" />
   <div id="pageDir" style='margin-top:5px;margin-left:200px;'></div>
</div>
